//
//  APIResponse.swift
//  JiaoZiTaxi
//
//  Created by Hu Gang on 2022/10/6.
//

import Foundation

struct APIResponse: Codable {
    let cmd: String
    
    enum CodingKeys: String, CodingKey {
        case cmd
    }
}

struct CMDResponse : Codable {
  let cmd: String
  let detectionID, endLat, endLon, endTimestamp: Int
  let mydistance: Double
  let peopleID: String
  let price, renshu, sended, shijirenshu: Int
  let startLat, startLon, startTimestamp: Int
  let subCmd: String

  enum CodingKeys: String, CodingKey {
    case cmd
    case detectionID = "detectionId"
    case endLat = "end_lat"
    case endLon = "end_lon"
    case endTimestamp = "end_timestamp"
    case mydistance
    case peopleID = "peopleId"
    case price, renshu, sended, shijirenshu
    case startLat = "start_lat"
    case startLon = "start_lon"
    case startTimestamp = "start_timestamp"
    case subCmd
  }
}

